<?php

class halloffame extends Controller {

	function halloffame()
	{
		parent::Controller();	
	}
	
	function index()
	{
		$this->load->model('studenthalloffamemodel');
	    $data['hall'] = $this->studenthalloffamemodel->getTop();
//		$data['lists'] = $this->studenthalloffamemodel->getAll();
		
		
		$this->load->library('pagination');

	    $per_page = 7;
   		$total = $this->studenthalloffamemodel->count_all();
   		$data['lists'] = $this->studenthalloffamemodel->getAllLimit($per_page, $this->uri->segment(3));
	    
   
   		$base_url = site_url('halloffame/index');
	    $config['base_url'] = $base_url;
	    $config['total_rows'] = $total;
	    $config['per_page'] = $per_page;
	    $config['uri_segment'] = '3';
	
	    $this->pagination->initialize($config); 
		
		$data['paging'] = $this->pagination->create_links();
		
		
		$this->load->view('f_halloffame', $data);
	}
}
?>